package com.ichina.chat.dao;

import java.util.List;
import com.ichina.chat.vo.Server;
/**
 * @author 杜连秋
 */
public interface ServerDao {

	/**
	 * 添加一个客服
	 * @param server 客服信息
	 * @return 添加成功还是失败
	 * @throws Exception
	 */
	public boolean addServer(Server server)throws Exception;
	/**
	 * 删除客服
	 * @param sid
	 * @return
	 * @throws Exception
	 */
	public boolean delServer(int sid)throws Exception;
	/**
	 * 修改
	 * @param server
	 * @return
	 * @throws Exception
	 */
	public boolean updateServer(Server server)throws Exception;
	/**
	 * 查询单个
	 * @param sid
	 * @return
	 * @throws Exception
	 */
	public Server loadServerById(int sid)throws Exception;
	/**
	 * 查询所有
	 * @return
	 * @throws Exception
	 */
	public List<Server> getAll()throws Exception;
	/**
	 * 获得总的条数
	 * @return
	 * @throws Exception
	 */
	public int getCount()throws Exception;
	//客服登录
	public boolean login(String sname)throws Exception;
	public boolean logout(String sname)throws Exception;
}
